package org.jeecg.modules.activity.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.activity.entity.UsrUserActivityApply;
import org.jeecg.modules.activity.mapper.UsrUserActivityApplyMapper;
import org.jeecg.modules.activity.service.IUsrUserActivityApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Map;

/**
 * @Description: 用户活动报名
 * @Author: jeecg-boot
 * @Date:   2020-05-02
 * @Version: V1.0
 */
@Service
public class UsrUserActivityApplyServiceImpl extends ServiceImpl<UsrUserActivityApplyMapper, UsrUserActivityApply> implements IUsrUserActivityApplyService {

    @Autowired
    private  UsrUserActivityApplyMapper usrUserActivityApplyMapper;
    @Override
    public Page<Map<String, Object>> getApplyInfo(Map<String, Object> param) {
        Page<Map<String, Object>> page = new Page<>();
        page.setRecords(null != usrUserActivityApplyMapper.getApplyInfo(param)?usrUserActivityApplyMapper.getApplyInfo(param):new ArrayList<>());
        page.setTotal(null != usrUserActivityApplyMapper.getApplyInfoTotal(param)?usrUserActivityApplyMapper.getApplyInfoTotal(param):0);
        return page;
    }
}
